package com.txby.common.utils.util;

import java.io.IOException;
import java.lang.reflect.Type;

import org.springframework.http.HttpOutputMessage;
import org.springframework.http.converter.HttpMessageNotWritableException;
import org.springframework.http.converter.json.GsonHttpMessageConverter;

public class JSONHttpMessageConverter extends GsonHttpMessageConverter {

    public JSONHttpMessageConverter() {
        super.setGson(GsonBuilderUtils.create());
    }

	/* (非 Javadoc) 
	* <p>Title: writeInternal</p> 
	* <p>Description: </p> 
	* @param o
	* @param type
	* @param outputMessage
	* @throws IOException
	* @throws HttpMessageNotWritableException 
	* @see org.springframework.http.converter.json.GsonHttpMessageConverter#writeInternal(java.lang.Object, java.lang.reflect.Type, org.springframework.http.HttpOutputMessage) 
	*/
	@Override
	protected void writeInternal(Object o, Type type, HttpOutputMessage outputMessage)
			throws IOException, HttpMessageNotWritableException {
		// TODO Auto-generated method stub
		super.writeInternal(o, type, outputMessage);
	}
    
}
 